import { fromJS } from 'immutable'
import cookBookMethod from '../methods/cookbookMethod'

const defaultState = fromJS({
  swiper: [],
  hotcate: [],
  // 精品好菜
  goodcook: []
})

export default (state = defaultState, action) => {
  try {
    return cookBookMethod[action.type](state, action)
  } catch (e) {
    return state
  }
}